/* global WPGroHo:true, Gravatar */ ( function () { var extend = function ( out ) { out = out || {}; for ( var i = 1; i < arguments.length; i++ ) { if ( ! arguments[ i ] ) continue; for ( var key in arguments[ i ] ) { if ( arguments[ i ].hasOwnProperty( key ) ) out[ key ] = arguments[ i ][ key ]; } } return out; }; WPGroHo = extend( { my_hash: '', data: {}, renderers: {}, syncProfileData: function ( hash, id ) { var hashElements; if ( ! WPGroHo.data[ hash ] ) { WPGroHo.data[ hash ] = {}; hashElements = document.querySelectorAll( 'div.grofile-hash-map-' + hash + ' span' ); for ( var i = 0; i < hashElements.length; i++ ) { WPGroHo.data[ hash ][ hashElements[ i ].className ] = hashElements[ i ].innerText; } } WPGroHo.appendProfileData( WPGroHo.data[ hash ], hash, id ); }, appendProfileData: function ( data, hash, id ) { for ( var key in data ) { if ( 'function' === typeof WPGroHo.renderers[ key ] ) { return WPGroHo.renderers[ key ]( data[ key ], hash, id, key ); } var card = document.getElementById( id ); if ( card ) { var heading = card.querySelector( 'h4' ); if ( heading ) { var extra = document.createElement( 'p' ); extra.className = 'grav-extra ' + key; extra.innerHTML = data[ key ]; heading.insertAdjacentElement( 'afterend', extra ); } } } }, }, WPGroHo || {} ); var jetpackHovercardsInit = function () { if ( 'undefined' === typeof Gravatar ) { return; } Gravatar.profile_cb = function ( h, d ) { WPGroHo.syncProfileData( h, d ); }; Gravatar.my_hash = WPGroHo.my_hash; Gravatar.init( 'body', '#wpadminbar' ); }; if ( document.readyState === 'interactive' || document.readyState === 'complete' ) { jetpackHovercardsInit(); } else { document.addEventListener( 'DOMContentLoaded', jetpackHovercardsInit ); } } )(); ; /*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */ "document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||!function(t){"use strict";if("Element"in t){var e="classList",n="prototype",i=t.Element[n],s=Object,r=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},o=Array[n].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1},a=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},c=function(t,e){if(""===e)throw new a("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new a("INVALID_CHARACTER_ERR","String contains an invalid character");return o.call(t,e)},l=function(t){for(var e=r.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],i=0,s=n.length;s>i;i++)this.push(n[i]);this._updateClassName=function(){t.setAttribute("class",""+this)}},u=l[n]=[],h=function(){return new l(this)};if(a[n]=Error[n],u.item=function(t){return this[t]||null},u.contains=function(t){return t+="",-1!==c(this,t)},u.add=function(){var t,e=arguments,n=0,i=e.length,s=!1;do t=e[n]+"",-1===c(this,t)&&(this.push(t),s=!0);while(++nn;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}()); ; !function(){"use strict";if("querySelector"in document&&"addEventListener"in window){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(document.documentElement.contains(this))do{if(t.matches(e))return t}while(null!==(t=t.parentElement));return null});var o=function(t){return Array.prototype.filter.call(t.parentNode.children,function(e){return e!==t})},e=document.querySelectorAll(".menu-toggle"),t=document.querySelectorAll("nav .dropdown-menu-toggle"),n=document.querySelectorAll("nav .main-nav ul a"),l=document.querySelector(".mobile-menu-control-wrapper"),a=document.body,c=document.documentElement,u=function(e){if(e&&a.classList.contains("dropdown-hover")){var t=e.querySelectorAll("li.menu-item-has-children");for(f=0;f a"),m=function(){if(!this.closest("nav").classList.contains("toggled")&&!this.closest("nav").classList.contains("slideout-navigation"))for(var e=this;-1===e.className.indexOf("main-nav");)"li"===e.tagName.toLowerCase()&&e.classList.toggle("sfHover"),e=e.parentElement},v=function(){if(!this.closest("nav").classList.contains("toggled")&&!this.closest("nav").classList.contains("slideout-navigation"))for(var e=this;-1===e.className.indexOf("menu-bar-items");)e.classList.contains("menu-bar-item")&&e.classList.toggle("sfHover"),e=e.parentElement},f=0;f